import { reactive } from 'vue';

export default function () {
  /**
   * @method 资源目录左侧表格标题
   */
  const leftcolumns = reactive([
    {
      title: '资源名称',
      dataIndex: 'name',
      ellipsis: true,
      tooltip: true
    },
    {
      title: '版本号',
      dataIndex: 'version',
      ellipsis: true,
      tooltip: true
    }
  ]);
  /**
   * @method 资源目录table表格的数据
   */

  const leftdata = reactive([
    {
      id: 1,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1
    },
    {
      code: 'ED007',
      create: '中电演示',
      created_time: '2024-05-16 12:26:21',
      data_browsing_number: 300,
      data_call_number: 100,
      data_download_number: 50,
      data_fields_count: 12,
      data_update_time: '2024-04-11 00:00:00',
      from: '公开授权',
      id: 2,
      is_root: 2,
      name: '教育统计数据',
      production_resource: '有理有据',
      resource_owner: [
        {
          code: 'ZT10320240516114524',
          name: '上海鸿运慧谷科技有限公司',
          credit_code: '91310111MA1H3CU73E'
        }
      ],
      scene: ['教育'],
      security_level: '有条件开放',
      sync_consanguinity: false,
      update_frequency: '每月',
      update_time: '2024-05-16 12:26:21',
      version: 1
    },
    {
      id: 3,
      code: 'ZC20261235',
      name: '测试曾多年未都能成为哦非常浓违反你从未妇女',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1,
      resource_owner: [
        {
          address: '上海市杨浦区政民路789号',
          code: 'ZT10320240516114524',
          created_time: '2024-05-16',
          credit_code: '91310111MA1H3CU73E',
          id: 17,
          name: '上海鸿运慧谷科技有限公司'
        }
      ]
    },
    {
      id: 4,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 0,
      resource_owner: [
        {
          address: '上海市杨浦区政民路789号',
          code: 'ZT10320240516114524',
          created_time: '2024-05-16',
          credit_code: '91310111MA1H3CU73E',
          id: 17,
          name: '上海鸿运慧谷科技有限公司'
        }
      ]
    },
    {
      id: 5,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1,
      resource_owner: [
        {
          address: '上海市杨浦区政民路789号',
          code: 'ZT10320240516114524',
          created_time: '2024-05-16',
          credit_code: '91310111MA1H3CU73E',
          id: 17,
          name: '上海鸿运慧谷科技有限公司'
        }
      ]
    },
    {
      id: 6,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1
    },
    {
      id: 7,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1
    },
    {
      id: 8,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1
    },
    {
      id: 9,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1
    },
    {
      id: 10,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1
    },
    {
      id: 11,
      code: 'ZC20261235',
      name: '测试211111',
      version: 'v1',
      security_level: '无条件开放',
      scene: '招商、服务',
      is_root: 1
    }
  ]);
  /**
   * @method 资源目录右侧表格标题
   */
  const rightcolumns = reactive([
    {
      title: '资源编号',
      dataIndex: 'code'
    },
    {
      title: '资源名称',
      dataIndex: 'name',
      ellipsis: true,
      tooltip: true
    },
    {
      title: '资源版本',
      dataIndex: 'version'
    },
    {
      title: '资源密度',
      dataIndex: 'security_level'
    },
    {
      title: '数据应用场景',
      dataIndex: 'scene'
    },
    {
      title: '是否根资源',
      dataIndex: 'is_root'
    }
  ]);

  return {
    leftcolumns,
    leftdata,
    rightcolumns
  };
}
